<!DOCTYPE html>
<html xmlns:shiro="http://www.w3.org/1999/xhtml" xmlns:th="http://www.w3.org/1999/xhtml">
<meta charset="utf-8">
<head th:include="@{include}::header"></head>
<style>
    .layui-table-cell{
        height: auto!important;
        white-space: normal;
    }
</style>
<body>
<div class="layuimini-container">
    <div class="layuimini-main">
        <fieldset class="table-search-fieldset">
            <legend>搜索信息</legend>
            <form class="layui-form layui-form-pane" action="">
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">标题</label>
                        <div class="layui-input-inline">
                            <input type="text" id="keywords" name="keywords" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-inline" th:classappend="${user.townId == null || user.townId == 0}  ? '' : 'layui-hide'">
                        <label class="layui-form-label" >乡镇</label>
                        <div class="layui-input-inline">
                            <select id="townId" name="townId" class="layui-input" lay-filter="townId" >
                                <option value="" >所属乡镇</option>
                                <th:block th:each="t : ${townsList}">
                                    <option th:value="${t.id}" th:text="${t.townName}" th:selected="${user.townId eq t.id}"></option>
                                </th:block>
                            </select>
                        </div>
                    </div>
                    <div class="layui-inline" th:classappend="${user.shopId == null || user.shopId == 0}  ? '' : 'layui-hide'">
                        <label class="layui-form-label">企业</label>
                        <div class="layui-input-inline">
                            <select id="companyId" name="companyId" lay-search="" class="layui-input" th:classappend="${user.shopId == null || user.shopId == 0}  ? '' : 'layui-hide'">
                                <option value="">所属企业</option>
                                <th:block th:each="c : ${shopList}">
                                    <option th:value="${c.id}" th:text="${c.shopName}" ></option>
                                </th:block>
                            </select>
                        </div>
                    </div>
                    <div class="layui-inline">
                        <button type="submit" class="layui-btn layui-btn-primary  layui-btn-sm" lay-submit lay-filter="data-search-btn">
                            <i class="layui-icon"></i> 搜 索</button>
                    </div>
                </div>
            </form>
        </fieldset>
        <script type="text/html" id="toolbarDemo">
            <div class="layui-btn-container">
                <button shiro:hasPermission="module:article:add" class="layui-btn layui-btn-sm data-add-btn"
                        lay-event="add">添加
                </button>
            </div>
        </script>
        <table class="layui-hide" id="exampleTable" lay-filter="currentTableFilter"></table>
        <script type="text/html" id="currentTableBar">
            <a class="layui-btn layui-btn-xs data-count-edit" shiro:hasPermission="module:article:edit" lay-event="edit">编辑</a>
            <a class="layui-btn layui-btn-xs layui-btn-danger data-count-delete" shiro:hasPermission="module:article:remove" lay-event="delete">删除</a>
        </script>
    </div>
</div>
<!--shiro控制bootstraptable行内按钮看见性 来自bootdo的创新方案 -->
<div th:include="@{include}::footer"></div>
<script type="text/javascript" th:src="@{/js/appjs/module/article/article.js}"></script>
</body>
</html>
